/**
 * Created by tanbingqin on 2018/12/19.
 */
import config from 'config'
import httpFetch from 'share/httpFetch'

export default {

  //根据审批节点oid批量查节点名称
  getApproveNodeName(params) {
    return httpFetch.post(`${config.baseUrl}/brms/api/rule/approval/batch/node/name`, params)
  },

  //审批通过
  handleOtherApprovePass(params) {
    return httpFetch.post(`${config.baseUrl}/api/approvals/pass`, params)
  },

  //审批驳回
  handleOtherApproveReject(params) {
    return httpFetch.post(`${config.baseUrl}/api/approvals/reject`, params)
  },

  getUserAvatar(userOID){
    return httpFetch.get(`${config.baseUrl}/api/users/oids?page=0&size=1&userOIDs=${userOID}`)
  },

  //根据表单OID获取其他单类型
  getFormType(OID) {
    return httpFetch.get(`${config.baseUrl}/api/custom/forms/${OID}`)
  },

  //获取其他单详情接口
  getOtherDetail(OID) {
    return httpFetch.get(`${config.baseUrl}/api/common/document/${OID}`)
  },

  //加签人的选择范围人员
  postAddSignEnableScope(params){
    return httpFetch.post(`${config.baseUrl}/api/countersign/addSign/enable/and/scope`, params)
  },
}
